proc factorial {n} {
    if {$n == 1} {
        return 1
    } else {
        return [expr $n * [factorial [expr $n - 1]]]
    }
}


puts [factorial [lindex $argv 0]]
